// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'AlternativeId',
        footer: "Foots",
        cnName: '替代料管理',
        name: 'alternativematerialsmodel',
        url: "/alternativematerialsmodel/",
        sortName: "AlternativeId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"ProductItemId":"","AlternativeMaterialsId":"","TicketsId":"","AlternativeMaterialsStartDate":"","AlternativeMaterialsEndDate":"","AlternativeMaterialsRemark":""};
    const editFormOptions = [[{"dataKey":"物料列表","data":[],"title":"源物料编码(外键)","field":"ProductItemId","type":"select"}],
                              [{"dataKey":"物料列表","data":[],"title":"替代物料编码(外键)","field":"AlternativeMaterialsId","type":"select"}],
                              [{"dataKey":"工艺路线","data":[],"title":"工单编码（外键）","field":"TicketsId","type":"select"}],
                              [{"title":"有效开始日期","field":"AlternativeMaterialsStartDate","type":"date"}],
                              [{"title":"有效截止日期","field":"AlternativeMaterialsEndDate","type":"date"}],
                              [{"title":"备注","field":"AlternativeMaterialsRemark","type":"textarea"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'AlternativeId',title:'替代料id',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ProductItemId',title:'源物料编码(外键)',type:'string',bind:{ key:'物料列表',data:[]},width:110,align:'left',sort:true},
                       {field:'AlternativeMaterialsId',title:'替代物料编码(外键)',type:'string',bind:{ key:'物料列表',data:[]},width:110,align:'left'},
                       {field:'TicketsId',title:'工单编码（外键）',type:'int',bind:{ key:'工艺路线',data:[]},width:110,align:'left'},
                       {field:'AlternativeMaterialsStartDate',title:'有效开始日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AlternativeMaterialsEndDate',title:'有效截止日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'AlternativeMaterialsRemark',title:'备注',type:'string',width:180,align:'left'},
                       {field:'CreateUserName',title:'创建人',type:'string',width:120,align:'left'},
                       {field:'UpdateUserName',title:'修改人',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'UpdateTime',title:'更新时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'IsDeleted',title:'软删除',type:'sbyte',width:110,hidden:true,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}